<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			function Counter(){
				this.num = 0;
				this.timer = setInterval(function add(){
					this.num++;
					console.log(this.num);
				},1000);
			}
			var a = new Counter();
			
		</script>
	</body>
</html>
